<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>按天包车</title>
<script src="${ctxStatic }/jquery/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="${ctxStatic }/gov/js/cityselect.js" ></script>
<link rel="stylesheet" href="${ctxStatic }/gov/css/govday.css" />
<link href="${ctxStatic }/cityselector/cityselect.css" rel='stylesheet'type='text/css' />
<link rel="stylesheet" href="${ctxStatic }/gov/css/gov_total.css" />
<script type="text/javascript" src="${ctxStatic }/gov/js/gov.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=kOQ8j9rd2ATw2R54boLMFUalu3gGNGDO&s=1"></script>
<script type="text/javascript" src="${ctxStatic }/index/js/map.js"></script>
	
	<link href="${ctxStatic }/xiake/css/list.css" rel='stylesheet' type='text/css' />
<script type="text/javascript">
	$(function() {
		if("${message}".length>0){
			alert("${message}");
		}
		
		// 初始化站点选择框
		$.post('${ctxFront}/info/site/siteJson',{spottypes:'0,b'}, function(data) {
			var allCity = data;//['北京市#001#1|beijing|bj','上海市#002#0|shanghai|sh'];
			new Vcity.CitySelector({input:'departcity_sitename',cityData:allCity});
		});
		$('.tstyle').click(function(){
			$("#tsy").val($(this).attr("value"));
			$("#pageNo").val(1);
			$("#pageSize").val(6);
			$('#searchForm').submit();
		});
		$('#daysearch').click(function(){
			$("#pageNo").val(1);
			$("#pageSize").val(6);
			$('#searchForm').submit();
		});
		//日租包车
		$('.dayRentType').on('change',function(){
			changeRentType($(this).val());
		});
		var keyVal2 = "${sessionScope.mes}";
		if(keyVal2.length!=0){  
			alert(keyVal2);
			/* window.location.href = '${ctxFront }/indexDayRent'; */
		}
		changeRentType($('.dayRentType:checked').val());
	})
	function changeRentType(val){
	if(val=='市内') {
		$('#destcity_sitename').attr('disabled','disabled');
		$('#destcity_sitename').parent().hide();
		$('#half').removeAttr("disabled");
	}
	if(val=='跨市') {
		$('#destcity_sitename').removeAttr('disabled');
		$('#destcity_sitename').parent().hide();
		$('#half').attr('disabled',"true");
	}
}
	function page(n,s){
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}

</script>
</head>
<%
session.removeAttribute("mes");
	%>
<body>
		<%@include file="../index/head.jsp" %>
		 <div id="govday">
			<div class="govday-main clearfix">
				<div class="govday-tw-top">
					<div class="govday-t-qy">
						<form id="searchForm" action="${ctxGov }/getDayRentList" method="post">
						<input id="pageNo" name="pageNo" type="hidden" value="1"/>
						<input id="pageSize" name="pageSize" type="hidden" value="6"/>
						<input type="hidden" name="tstyle" value="${tstyle }" id="tsy"/>
							<div class="govd-tw-il">
								<span>出发城市：</span>
								 <input type="text" id="departcity_sitename" data-autocity="yes"  name="departcity.sitename" value="${tRentproduct.departcity.sitename }" placeholder="请输入出发地" autocomplete="off"/>
								<input type="hidden" name="departcity.siteid" value="${tRentproduct.departcity.siteid }">
							</div>
							<div class="govd-tw-il">
								<span>出发时间：</span>
								<input type="text"  id ="fromdateStr" name="fromdateStr" value="${tRentproduct.fromdateStr }" class="Wdate" placeholder="请选择出发时间"  style="width: 260px;" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false,maxDate:'${maxDay }',minDate:'%y-%M-%d'})" />
							</div>
							<div class="govd-tw-il">
								<span>包车范围：</span>
								<label class="gov-d-ks">
		  	  	 	  	  	   	  	 <input type="radio" name="tabType" <c:if test="${tRentproduct.tabType eq '跨市' }">checked="checked"</c:if> class="govday-checked" value="跨市"/>
		  	  	 	  	  	   	  	 <font>跨市包车</font>
		  	  	 	  	  	   	  </label>
								<label class="gov-d-sn">
		  	  	 	  	  	   	  	 <input type="radio" name="tabType" <c:if test="${tRentproduct.tabType eq '市内' }">checked="checked"</c:if> class="govday-checked" value="市内"/>
		  	  	 	  	  	   	  	 <font>市内包车</font>
		  	  	 	  	  	</label>
							</div>
							<div class="govd-tw-il">
								<span>包车天数：</span>
								<select class="gov-dil-op" style="width: 130px;" name="daysnum">
									<option value="0" <c:if test="${tRentproduct.daysnum eq '0' }">selected="selected"</c:if> class="gov-halfday">0.5天</option>
									<option value="1" <c:if test="${tRentproduct.daysnum eq '1' }">selected="selected"</c:if> class="gov-oneday">1天</option>
									<option value="2" <c:if test="${tRentproduct.daysnum eq '2' }">selected="selected"</c:if> >2天</option>
									<option value="3" <c:if test="${tRentproduct.daysnum eq '3' }">selected="selected"</c:if>>3天</option>
									<option value="4" <c:if test="${tRentproduct.daysnum eq '4' }">selected="selected"</c:if>>4天</option>
									<option value="5" <c:if test="${tRentproduct.daysnum eq '5' }">selected="selected"</c:if>>5天</option>
									<option value="6" <c:if test="${tRentproduct.daysnum eq '6' }">selected="selected"</c:if>>6天</option>
									<option value="7" <c:if test="${tRentproduct.daysnum eq '7' }">selected="selected"</c:if>>7天</option>
									<option value="8" <c:if test="${tRentproduct.daysnum eq '8' }">selected="selected"</c:if>>8天</option>
									<option value="9" <c:if test="${tRentproduct.daysnum eq '9' }">selected="selected"</c:if>>9天</option>
									<option value="10" <c:if test="${tRentproduct.daysnum eq '10' }">selected="selected"</c:if>>10天</option>
								</select>
							</div>
							<div class="govd-tw-ri">
								<input type="submit" value="查询" />
							</div>
						</form>
					</div>
					<div class="gov-cars-choice">
						<div class="gov-car-ctit">
							<p>选择车型：</p>
							<p>
								<a  class="tstyle" value=""  href="javascript:;">
								<span class="txt_gov">不限</span>
								</a>
							</p>
						</div>
						<div class="gov-car-il">
							<a  class="tstyle" value="xc"  href="javascript:;">
							<i class="iconfont  <c:if test='${tstyle == "xc" }'>gov-c-green</c:if>">&#xe66c;</i>
							<span class="txt_gov">4座小车</span>
							</a>
						</div>
						<div class="gov-car-il">
							<a  class="tstyle" value="swc">
							<i class="iconfont  <c:if test='${tstyle == "swc" }'>gov-c-green</c:if>">&#xe607;</i>
							<span class="txt_gov">6座商务车</span>
							</a>
						</div>
						<div class="gov-car-il">
							<a  class="tstyle" value="xb">
							<i class="iconfont  <c:if test='${tstyle == "xb" }'>gov-c-green</c:if>">&#xe61b;</i>
							<span class="txt_gov">14座以下小巴</span>
							</a>
						</div>
						<div class="gov-car-il">
							<a  class="tstyle" value="zb">
							<i class="iconfont  <c:if test='${tstyle == "zb" }'>gov-c-green</c:if>">&#xe665;</i>
							<span class="txt_gov">24座以下中巴</span>
							</a>
						</div>
						<div class="gov-car-il">
							<a  class="tstyle" value="db">
							<i class="iconfont  <c:if test='${tstyle == "db" }'>gov-c-green</c:if>">&#xe65d;</i>
							<span class="txt_gov">25座以上中巴</span>
							</a>
						</div>
					</div>
				</div>
				
				<div class="govday-tw-body">
					<div class="carday_vs">
						<div class="carf_list">
						
						 <c:forEach items="${cargotypeList}" var="info">
							<div class="carf_oi">
								<div class="carg_i">
									<div class="carg_l_img">
										<img src="../${info.images}" />
									</div>
									<div class="carg_r_ex">
										<div class="carg_nm">
											<p>
												<span>${info.typename}</span>
												<span>
               	    	 	 	   	   	   	    <i class="cig-ico01"></i>
               	    	 	 	   	   	   	    <b>核载${info.seats}人</b>
               	    	 	 	   	   	   </span>
												<span>
               	    	 	 	   	   	   	    <i class="cig-ico02"></i>
               	    	 	 	   	   	   	    <b>件数${info.packs}件</b>
               	    	 	 	   	   	   </span>
											</p>
											<p>${info.typedesc}</p>
										</div>
									</div>
									<div class="carg_kl">
										<p>￥${info.lowestAirPrice}起</p>
									</div>
								</div>
								<div class="caro_li">
									<div class="caro_ik_tit">
										<span>车队</span>
										<span>特色服务</span>
										<span>价格/天</span>
										<span>操作</span>
									</div>
									<div class="caro_body">
										<c:if test="${fn:length(info.rentproductList)>1}">
										<i class="caro_jia">
										</i>
										</c:if>
										 <c:forEach items="${info.rentproductList}" var="rentproductList" varStatus="vs">
										 <div  class="caro_ik <c:if test='${vs.index==0}'>m_price</c:if>
										 		<c:if test='${vs.index!=0}'>hid_price</c:if> ">
											<span>${rentproductList.office.abbr} </span>
											<span>
											<c:if test="${rentproductList.office.businesssuit == '1'}">商务正装</c:if> &nbsp;
											<c:if test="${rentproductList.office.tablewater == '1'}">免费提供矿泉水</c:if> &nbsp;
											<c:if test="${rentproductList.office.paper == '1'}">纸巾</c:if> &nbsp;
											<c:if test="${rentproductList.office.iswifi == '1'}">无线wifi</c:if> &nbsp;
											<c:if test="${rentproductList.office.powersupply == '1'}">车载充电</c:if> &nbsp;
											</span>
											<span>${rentproductList.suitrtnprice}元</span>
											<span>
               	    	 	 	 	 	 <a class="dc-button" id="detail" href="javascript:window.location.href=
											'${ctxGov}/dayRentDetails?
											daysnum=${tRentproduct.daysnum }
											&images=${info.images }
											&rentid=${rentproductList.rentid}
											&office.iswifi=${rentproductList.office.iswifi }
											&office.powersupply=${rentproductList.office.powersupply }
											&office.tablewater=${rentproductList.office.tablewater }
											&office.businesssuit=${rentproductList.office.businesssuit  }
											&office.paper=${rentproductList.office.paper }
											&rentType=${rentproductList.rentType}
											&tabType=${tRentproduct.tabType}
											&fromdateStr='+$('#fromdateStr').val();" >预定</a>
               	    	 	 	 	 </span>
										</div>
										</c:forEach>
									</div>
								</div>
							</div>
						</c:forEach>	
						</div>
					</div>
				</div>
			</div>
			</div>
			<c:if test="${empty page.list }">
				<div style="text-align: center;margin:20px;font-size:14px;color:#607D8B;">霞客君太懒，您要的产品还没有上架。您可以试试<a href="${ctxGov }/customRent" style="color:#4FBDBA;">定制包车</a>哦~</div>
			</c:if>
			<div style="text-align: center;">
		<div class="pagination  font_normal_size" >${page.html}</div></div>
		 <%@include file="../index/foot.jsp" %>
	</body>
 </html>